<?php

/**
 * ApplicationCorporateIndividual filter form base class.
 *
 * @package    digitalform
 * @subpackage filter
 * @author     Saul Santiago
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseApplicationCorporateIndividualFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'ref_number'                            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'existing_subscriber'                   => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'globe_mobile_access_code'              => new sfWidgetFormFilterInput(),
      'globe_mobile_phone_number'             => new sfWidgetFormFilterInput(),
      'globe_telephone_access_code'           => new sfWidgetFormFilterInput(),
      'globe_telephone_phone_number'          => new sfWidgetFormFilterInput(),
      'others_subscriber'                     => new sfWidgetFormFilterInput(),
      'sex'                                   => new sfWidgetFormChoice(array('choices' => array('' => '', 'MALE' => 'MALE', 'FEMALE' => 'FEMALE'))),
      'last_name'                             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'first_name'                            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'middle_name'                           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'birthday'                              => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'mothers_maiden_name'                   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'home_ownership'                        => new sfWidgetFormChoice(array('choices' => array('' => '', 'OWNED' => 'OWNED', 'LIVING WITH RELATIVES' => 'LIVING WITH RELATIVES', 'COMPANY-OWNED' => 'COMPANY-OWNED', 'RENTED' => 'RENTED', 'MORTGAGE' => 'MORTGAGE'))),
      'rented_per_month'                      => new sfWidgetFormFilterInput(),
      'mortgage_per_month'                    => new sfWidgetFormFilterInput(),
      'years_of_stay'                         => new sfWidgetFormFilterInput(),
      'home_address'                          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'home_brgy_municipality_town'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'home_city_province'                    => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'home_postal_code_zip_code'             => new sfWidgetFormFilterInput(),
      'home_telephone_number'                 => new sfWidgetFormFilterInput(),
      'email_address'                         => new sfWidgetFormFilterInput(),
      'tin'                                   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'gsis_sss'                              => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'citizenship'                           => new sfWidgetFormFilterInput(),
      'foreigner_country'                     => new sfWidgetFormFilterInput(),
      'passport_number'                       => new sfWidgetFormFilterInput(),
      'acr_number'                            => new sfWidgetFormFilterInput(),
      'passport_expiry_date'                  => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'civil_status'                          => new sfWidgetFormChoice(array('choices' => array('' => '', 'SINGLE' => 'SINGLE', 'MARRIED' => 'MARRIED', 'WIDOW/WIDOWER' => 'WIDOW/WIDOWER', 'LEGALLY SEPARATED' => 'LEGALLY SEPARATED'))),
      'spouse_name'                           => new sfWidgetFormFilterInput(),
      'spouse_birthday'                       => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'spouse_profession_company_name'        => new sfWidgetFormFilterInput(),
      'spouse_position'                       => new sfWidgetFormFilterInput(),
      'spouse_telephone_number'               => new sfWidgetFormFilterInput(),
      'employer_business_name'                => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'industry'                              => new sfWidgetFormFilterInput(),
      'business_address'                      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'business_brgy_municipality_town'       => new sfWidgetFormFilterInput(),
      'business_city_province'                => new sfWidgetFormFilterInput(),
      'business_postal_code_zip_code'         => new sfWidgetFormFilterInput(),
      'office_telephone_number'               => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'years_in_company'                      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'current_position_held'                 => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'personal_monthly_income'               => new sfWidgetFormChoice(array('choices' => array('' => '', 'BELOW P10,000' => 'BELOW P10,000', 'P10,000 - P24,999' => 'P10,000 - P24,999', 'P25,000 - P34,999' => 'P25,000 - P34,999', 'ABOVE P35,000' => 'ABOVE P35,000'))),
      'authorized_contact_person'             => new sfWidgetFormFilterInput(),
      'authorized_contact_relation'           => new sfWidgetFormFilterInput(),
      'authorized_contact_number'             => new sfWidgetFormFilterInput(),
      'bills_sent_to'                         => new sfWidgetFormChoice(array('choices' => array('' => '', 'HOME ADDRESS' => 'HOME ADDRESS', 'BUSINESS ADDRESS' => 'BUSINESS ADDRESS'))),
      'plans_gplan'                           => new sfWidgetFormFilterInput(),
      'plans_gflex'                           => new sfWidgetFormFilterInput(),
      'plans_others'                          => new sfWidgetFormFilterInput(),
      'promo'                                 => new sfWidgetFormFilterInput(),
      'value_added_service_special_features'  => new sfWidgetFormFilterInput(),
      'handset_brand_model'                   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'handset_provided_by'                   => new sfWidgetFormChoice(array('choices' => array('' => '', 'GLOBE TELECOM' => 'GLOBE TELECOM', 'SUBSCRIBER' => 'SUBSCRIBER'))),
      'handset_imei_number'                   => new sfWidgetFormFilterInput(),
      'handset_hbp'                           => new sfWidgetFormFilterInput(),
      'handset_lockup_period'                 => new sfWidgetFormFilterInput(),
      'sim_card_number'                       => new sfWidgetFormFilterInput(),
      'authorized_person_to_receive_delivery' => new sfWidgetFormFilterInput(),
      'complete_delivery_address'             => new sfWidgetFormFilterInput(),
      'bulk_service'                          => new sfWidgetFormFilterInput(),
      'max_authorized_recipients'             => new sfWidgetFormFilterInput(),
      'distribution_type'                     => new sfWidgetFormChoice(array('choices' => array('' => '', 'EQUAL' => 'EQUAL', 'PRIORITIZATION' => 'PRIORITIZATION'))),
      'nominated_postpaid_charging_account'   => new sfWidgetFormFilterInput(),
      'corporate_id'                          => new sfWidgetFormFilterInput(),
      'status'                                => new sfWidgetFormChoice(array('choices' => array('' => '', 'COMPLETION' => 'COMPLETION', 'PROCESSING' => 'PROCESSING', 'ACTIVATED' => 'ACTIVATED'))),
      'deleted'                               => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'created_at'                            => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'updated_at'                            => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
    ));

    $this->setValidators(array(
      'ref_number'                            => new sfValidatorPass(array('required' => false)),
      'existing_subscriber'                   => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'globe_mobile_access_code'              => new sfValidatorPass(array('required' => false)),
      'globe_mobile_phone_number'             => new sfValidatorPass(array('required' => false)),
      'globe_telephone_access_code'           => new sfValidatorPass(array('required' => false)),
      'globe_telephone_phone_number'          => new sfValidatorPass(array('required' => false)),
      'others_subscriber'                     => new sfValidatorPass(array('required' => false)),
      'sex'                                   => new sfValidatorChoice(array('required' => false, 'choices' => array('MALE' => 'MALE', 'FEMALE' => 'FEMALE'))),
      'last_name'                             => new sfValidatorPass(array('required' => false)),
      'first_name'                            => new sfValidatorPass(array('required' => false)),
      'middle_name'                           => new sfValidatorPass(array('required' => false)),
      'birthday'                              => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'mothers_maiden_name'                   => new sfValidatorPass(array('required' => false)),
      'home_ownership'                        => new sfValidatorChoice(array('required' => false, 'choices' => array('OWNED' => 'OWNED', 'LIVING WITH RELATIVES' => 'LIVING WITH RELATIVES', 'COMPANY-OWNED' => 'COMPANY-OWNED', 'RENTED' => 'RENTED', 'MORTGAGE' => 'MORTGAGE'))),
      'rented_per_month'                      => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'mortgage_per_month'                    => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'years_of_stay'                         => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'home_address'                          => new sfValidatorPass(array('required' => false)),
      'home_brgy_municipality_town'           => new sfValidatorPass(array('required' => false)),
      'home_city_province'                    => new sfValidatorPass(array('required' => false)),
      'home_postal_code_zip_code'             => new sfValidatorPass(array('required' => false)),
      'home_telephone_number'                 => new sfValidatorPass(array('required' => false)),
      'email_address'                         => new sfValidatorPass(array('required' => false)),
      'tin'                                   => new sfValidatorPass(array('required' => false)),
      'gsis_sss'                              => new sfValidatorPass(array('required' => false)),
      'citizenship'                           => new sfValidatorPass(array('required' => false)),
      'foreigner_country'                     => new sfValidatorPass(array('required' => false)),
      'passport_number'                       => new sfValidatorPass(array('required' => false)),
      'acr_number'                            => new sfValidatorPass(array('required' => false)),
      'passport_expiry_date'                  => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'civil_status'                          => new sfValidatorChoice(array('required' => false, 'choices' => array('SINGLE' => 'SINGLE', 'MARRIED' => 'MARRIED', 'WIDOW/WIDOWER' => 'WIDOW/WIDOWER', 'LEGALLY SEPARATED' => 'LEGALLY SEPARATED'))),
      'spouse_name'                           => new sfValidatorPass(array('required' => false)),
      'spouse_birthday'                       => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'spouse_profession_company_name'        => new sfValidatorPass(array('required' => false)),
      'spouse_position'                       => new sfValidatorPass(array('required' => false)),
      'spouse_telephone_number'               => new sfValidatorPass(array('required' => false)),
      'employer_business_name'                => new sfValidatorPass(array('required' => false)),
      'industry'                              => new sfValidatorPass(array('required' => false)),
      'business_address'                      => new sfValidatorPass(array('required' => false)),
      'business_brgy_municipality_town'       => new sfValidatorPass(array('required' => false)),
      'business_city_province'                => new sfValidatorPass(array('required' => false)),
      'business_postal_code_zip_code'         => new sfValidatorPass(array('required' => false)),
      'office_telephone_number'               => new sfValidatorPass(array('required' => false)),
      'years_in_company'                      => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'current_position_held'                 => new sfValidatorPass(array('required' => false)),
      'personal_monthly_income'               => new sfValidatorChoice(array('required' => false, 'choices' => array('BELOW P10,000' => 'BELOW P10,000', 'P10,000 - P24,999' => 'P10,000 - P24,999', 'P25,000 - P34,999' => 'P25,000 - P34,999', 'ABOVE P35,000' => 'ABOVE P35,000'))),
      'authorized_contact_person'             => new sfValidatorPass(array('required' => false)),
      'authorized_contact_relation'           => new sfValidatorPass(array('required' => false)),
      'authorized_contact_number'             => new sfValidatorPass(array('required' => false)),
      'bills_sent_to'                         => new sfValidatorChoice(array('required' => false, 'choices' => array('HOME ADDRESS' => 'HOME ADDRESS', 'BUSINESS ADDRESS' => 'BUSINESS ADDRESS'))),
      'plans_gplan'                           => new sfValidatorPass(array('required' => false)),
      'plans_gflex'                           => new sfValidatorPass(array('required' => false)),
      'plans_others'                          => new sfValidatorPass(array('required' => false)),
      'promo'                                 => new sfValidatorPass(array('required' => false)),
      'value_added_service_special_features'  => new sfValidatorPass(array('required' => false)),
      'handset_brand_model'                   => new sfValidatorPass(array('required' => false)),
      'handset_provided_by'                   => new sfValidatorChoice(array('required' => false, 'choices' => array('GLOBE TELECOM' => 'GLOBE TELECOM', 'SUBSCRIBER' => 'SUBSCRIBER'))),
      'handset_imei_number'                   => new sfValidatorPass(array('required' => false)),
      'handset_hbp'                           => new sfValidatorPass(array('required' => false)),
      'handset_lockup_period'                 => new sfValidatorPass(array('required' => false)),
      'sim_card_number'                       => new sfValidatorPass(array('required' => false)),
      'authorized_person_to_receive_delivery' => new sfValidatorPass(array('required' => false)),
      'complete_delivery_address'             => new sfValidatorPass(array('required' => false)),
      'bulk_service'                          => new sfValidatorPass(array('required' => false)),
      'max_authorized_recipients'             => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'distribution_type'                     => new sfValidatorChoice(array('required' => false, 'choices' => array('EQUAL' => 'EQUAL', 'PRIORITIZATION' => 'PRIORITIZATION'))),
      'nominated_postpaid_charging_account'   => new sfValidatorPass(array('required' => false)),
      'corporate_id'                          => new sfValidatorPass(array('required' => false)),
      'status'                                => new sfValidatorChoice(array('required' => false, 'choices' => array('COMPLETION' => 'COMPLETION', 'PROCESSING' => 'PROCESSING', 'ACTIVATED' => 'ACTIVATED'))),
      'deleted'                               => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'created_at'                            => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'updated_at'                            => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
    ));

    $this->widgetSchema->setNameFormat('application_corporate_individual_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'ApplicationCorporateIndividual';
  }

  public function getFields()
  {
    return array(
      'id'                                    => 'Number',
      'ref_number'                            => 'Text',
      'existing_subscriber'                   => 'Boolean',
      'globe_mobile_access_code'              => 'Text',
      'globe_mobile_phone_number'             => 'Text',
      'globe_telephone_access_code'           => 'Text',
      'globe_telephone_phone_number'          => 'Text',
      'others_subscriber'                     => 'Text',
      'sex'                                   => 'Enum',
      'last_name'                             => 'Text',
      'first_name'                            => 'Text',
      'middle_name'                           => 'Text',
      'birthday'                              => 'Date',
      'mothers_maiden_name'                   => 'Text',
      'home_ownership'                        => 'Enum',
      'rented_per_month'                      => 'Number',
      'mortgage_per_month'                    => 'Number',
      'years_of_stay'                         => 'Number',
      'home_address'                          => 'Text',
      'home_brgy_municipality_town'           => 'Text',
      'home_city_province'                    => 'Text',
      'home_postal_code_zip_code'             => 'Text',
      'home_telephone_number'                 => 'Text',
      'email_address'                         => 'Text',
      'tin'                                   => 'Text',
      'gsis_sss'                              => 'Text',
      'citizenship'                           => 'Text',
      'foreigner_country'                     => 'Text',
      'passport_number'                       => 'Text',
      'acr_number'                            => 'Text',
      'passport_expiry_date'                  => 'Date',
      'civil_status'                          => 'Enum',
      'spouse_name'                           => 'Text',
      'spouse_birthday'                       => 'Date',
      'spouse_profession_company_name'        => 'Text',
      'spouse_position'                       => 'Text',
      'spouse_telephone_number'               => 'Text',
      'employer_business_name'                => 'Text',
      'industry'                              => 'Text',
      'business_address'                      => 'Text',
      'business_brgy_municipality_town'       => 'Text',
      'business_city_province'                => 'Text',
      'business_postal_code_zip_code'         => 'Text',
      'office_telephone_number'               => 'Text',
      'years_in_company'                      => 'Number',
      'current_position_held'                 => 'Text',
      'personal_monthly_income'               => 'Enum',
      'authorized_contact_person'             => 'Text',
      'authorized_contact_relation'           => 'Text',
      'authorized_contact_number'             => 'Text',
      'bills_sent_to'                         => 'Enum',
      'plans_gplan'                           => 'Text',
      'plans_gflex'                           => 'Text',
      'plans_others'                          => 'Text',
      'promo'                                 => 'Text',
      'value_added_service_special_features'  => 'Text',
      'handset_brand_model'                   => 'Text',
      'handset_provided_by'                   => 'Enum',
      'handset_imei_number'                   => 'Text',
      'handset_hbp'                           => 'Text',
      'handset_lockup_period'                 => 'Text',
      'sim_card_number'                       => 'Text',
      'authorized_person_to_receive_delivery' => 'Text',
      'complete_delivery_address'             => 'Text',
      'bulk_service'                          => 'Text',
      'max_authorized_recipients'             => 'Number',
      'distribution_type'                     => 'Enum',
      'nominated_postpaid_charging_account'   => 'Text',
      'corporate_id'                          => 'Text',
      'status'                                => 'Enum',
      'deleted'                               => 'Boolean',
      'created_at'                            => 'Date',
      'updated_at'                            => 'Date',
    );
  }
}
